Class de.bb.minissl.SslClient
All Packages Class Hierarchy This Package Previous Next Index
Class de.bb.minissl.SslClient
Object
|
+----de.bb.minissl.SslClient
- public final class SslClient
- extends Object
Implements the client side handshake for SSL.
Creates the primary hello and passes the answer either to a Ssl2 or Ssl3 client.
-
de.bb.minissl.SslClient()
- Creates a new SslClient object, which uses the given InputStream for reading
and the given OutputStream for writing.
-
de.bb.minissl.SslClient(InputStream, OutputStream)
- Creates a new SslClient object, which uses the given InputStream for reading
and the given OutputStream for writing.
-
connect(InputStream, OutputStream)
- Connects the current object, which uses the given InputStream for reading
and the given OutputStream for writing.
-
getCertificates()
- Return the vector of received certificates.
-
getCipherType()
- Query the used ciphertype
-
getInputStream()
- Returns an input stream for this Ssl connection.
-
getOutputStream()
- Returns an input stream for this Ssl connection.
SslClient
public SslClient()
- Creates a new SslClient object, which uses the given InputStream for reading
and the given OutputStream for writing. To use this object is must be initialized
using the method
connect(InputStream is, OutputStream os)
- See Also:
- connect
SslClient
public SslClient(InputStream is,
OutputStream os) throws IOException
- Creates a new SslClient object, which uses the given InputStream for reading
and the given OutputStream for writing.
- Parameters:
- is - the InputStream, which is used for reading
- os - the OutputStream, which is used for writing
- Throws: IOException
- throws an IOException if any non recoverable error occurs.
connect
public void connect(InputStream is,
OutputStream os) throws IOException
- Connects the current object, which uses the given InputStream for reading
and the given OutputStream for writing.
- Parameters:
- is - the InputStream, which is used for reading
- os - the OutputStream, which is used for writing
- Throws: IOException
- throws an IOException if any non recoverable error occurs.
getCertificates
public final java.util.Vector getCertificates() throws IOException
- Return the vector of received certificates.
The vector contains elements of byte arrays (byte[]) with each a X.509 certificate.
The application must verify the validity of the cerificate(s)!
- Returns:
- a vector with all received certificates
- Throws: IOException
- throws an IOException when not connected
getCipherType
public int getCipherType() throws IOException
- Query the used ciphertype
- Returns:
- the used ciphertype
- 3 = SSL_RSA_WITH_RC4_40_MD5
- 4 = SSL_RSA_WITH_RC4_128_MD5
- 5 = SSL_RSA_WITH_RC4_128_SHA
- Throws: IOException
- throws an IOException when not connected
getInputStream
public java.io.InputStream getInputStream() throws IOException
- Returns an input stream for this Ssl connection.
- Returns:
- a stream for reading from this Ssl connection.
- Throws: IOException
- throws an IOException on error
getOutputStream
public java.io.OutputStream getOutputStream() throws IOException
- Returns an input stream for this Ssl connection.
- Returns:
- a stream for reading from this Ssl connection.
- Throws: IOException
- throws an IOException on error
All Packages Class Hierarchy This Package Previous Next Index